package cc;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.client.ClientProtocolException;

import com.alibaba.fastjson.JSONObject;
import com.bootdo.common.utils.GetUserList;
import com.bootdo.common.utils.HttpUtil;
import com.bootdo.common.wx.WeiXinUtil;
import com.bootdo.system.domain.Media_id;
import com.bootdo.system.domain.SendPojo;

public class cnmd3 {
	
	public static void main(String[] args) throws ClientProtocolException, IOException {
		  String accessToken =WeiXinUtil.getOauth2AccessToken2("wxcb74c2a7fb1fd161", "3ba771e951e1e0e917b7dcd777a25e06");
		  sendMsg(accessToken,"Wr8SVx7Dgzgll4I2-xlgj-GW9ZG5t6YpFTUsmH3D6Mc");
	}
	
	public static void sendMsg(String token,String id) throws ClientProtocolException, IOException {
		//先获取用户openid列表
		String url = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token="+token;
		List<String> userList =GetUserList.getUserList(token);
		for (String string : userList) {
			System.out.println(string);
		}
	}

}
